STEP 9: Let's space the ufo sprites along the y-axis.

We'll use the += increment operator to increase the value of the variable y each time the loop runs.

  • In LOGIC, go to and drop Add Value indented inside the loop.
  • Change the name of the variable from my_var to y.
  • Change the value being added to 75. This places our ufo's 75 pixels apart.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)